<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<div>
    <p>头像:<img src="/upload/${user.headPic}" style="width: 100px;height: 100px;border-radius:100px "></p>
    <p>账号:${user.name}</p>
    <p>性别:${user.sex==1?"男":"女"}</p>
    <p>状态:${user.status==1?"启用":user.status==2?"禁用":"冻结"}</p>
</div>
<h3>用户管理界面</h3>
<%--展示数据--%>
<button>新增</button>
<button>批量删除</button>
<table border="1" cellspacing="0" cellpadding="10">
    <tr>
        <th><input type="checkbox" onclick="checkAll()" id="all">全选</th>
        <th>编号</th>
        <th>账号</th>
        <th>密码</th>
        <th>头像</th>
        <th>性别</th>
        <th>状态</th>
        <th>时间</th>
        <th>操作</th>
    </tr>
    <c:forEach var="u" items="${list}">
        <tr>
            <td><input type="checkbox" name="ck" value="${u.id}"></td>
            <td>${u.id}</td>
            <td><a href="#">${u.name}</a></td>
            <td>${u.password}</td>
            <td>${u.sex}</td>
            <td>${u.status}</td>
            <td>${u.time}</td>
            <td><img src="/upload/${u.headPic}" style="width: 100px;height: 100px;border-radius:100px "></td>
            <td><a onclick="return confirm('是否删除?')"
                   href="#">删除</a>
                <a href="/down?filename=${u.headPic}">下载</a>
            </td>
        </tr>
    </c:forEach>
</table>
</body>
</html>
